import { defineStore } from 'pinia'

interface IState{
	 token: string; // 用户 Token
	 head:any
}


const mainStore= defineStore({
	id: 'mainStore',
	state():IState {
		return {
		  token: '',
		  head:[]
		}
	  },
	  persist: {
		enabled: true, // 开启持久化保存
	  },
	
	  
	getters: {
		
	},
	actions: {
		setHead(head:string){
			this.head=head;
		},
		setToken(token: string) {
		      this.token = token;
		    },
		removeToken() {
		      this.token = null;
		    },
		
	}
})
export default mainStore;